<?php	
//2.将age>20岁的所有人，年龄+1
update student set age=age+1 where age>20; 
//3.将年龄最小的同学删除
delete from student order by age asc limit 1;
//班级表
create table class(
	cid tinyint(5) unsigned primary key auto_increment,
	cname varchar(20) not null default ''
);
//学生表
create table student (
	sid int unsigned primary key auto_increment,
	sname varchar (30) not null default '',
	age tinyint(2) unsigned not null default 0,
	cid int	unsigned not null default 0
);
insert into student(sname,age,cid) values ("张三",20,1),("李四",22,2); 
//随机获取三条同学数据
select * from student order by rand() limit 3;

